#include "..\System\os_link.h"
#if SYSCFG_DEBUGGING == __ENABLED__

void UART2_Isr(void) interrupt 8// using 3
{
        if(S2CON & S2TI){
                S2CON &= ~S2TI;
                if(*s_debug_sendptr){
                        S2BUF = *s_debug_sendptr++;
                }
                else{
                        iDebugSend;
                }
        }
        if(S2CON & S2RI){
                S2CON &= ~S2RI;
                if(s_debug_recvptr - s_debug_recvbuff < OS_DEBUGRECVBUFFSIZE - 1){
                        *s_debug_recvptr++ = S2BUF;
                }
                iDebugRecv;
        }
}

#endif